//
//  STDoorStarCell.m
//  YiYueHairdresser
//
//  Created by zhouzhouzhou on 2018/10/9.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "STDoorStarCell.h"

#import "AnotherStarEvaluator.h"

@implementation STDoorStarCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    self = [[[NSBundle mainBundle] loadNibNamed:@"STDoorStarCell" owner:nil options:nil] lastObject];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    return self;
}

-(void)setStarViewWithData:(STDoorLocalModel *)data{
    AnotherStarEvaluator *starAllEva = [[AnotherStarEvaluator alloc] initWithFrame:CGRectMake(15,(self.starBackView.frame.size.height-28)/2, 121, 28)];
//    starAllEva.delegate = self;
    starAllEva.enabled=NO;
    [starAllEva setCurrentValue:[data.grade floatValue]];
    [self.starBackView addSubview:starAllEva];
    
    UILabel * scoreLab = [[UILabel alloc]initWithFrame:CGRectMake(15+121+10, (self.starBackView.frame.size.height-28)/2, 50, 28)];
    scoreLab.font = FONT(13);
    scoreLab.textColor = GrayTextColor;
    scoreLab.text = [NSString stringWithFormat:@"%@分",data.grade];
    [self.starBackView addSubview:scoreLab];
    self.nameLab.text =data.storeName;
    
}


@end

